Setting the default extension before a filter is selected allows
the IFileDialog to automatically change the extension when the
filter is changed. See:
https://learn.microsoft.com/en-us/windows/win32/api/shobjidl_core/nf-shobjidl_core-ifiledialog-setdefaultextension
if (FAILED (hr))
g_warning_hr ("Can't set file types", hr);
+ hr = IFileDialog_SetDefaultExtension (pfd, L"");
+ if (FAILED (hr))
+ g_warning_hr ("Can't set default extension", hr);
+
if (data->self->current_filter)
{
GSList *filters = gtk_file_chooser_list_filters (GTK_FILE_CHOOSER (data->self));